package com.matt.docpro.service;

import com.matt.docpro.mapper.ReviewMapper;
import com.matt.docpro.model.Appointment;
import com.matt.docpro.model.Review;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * AppointmentService
 * Created by on 2024/02/20.
 */
@Service
public class ReviewService {

    @Autowired
    ReviewMapper reviewMapper;

    public List<Review> getAll() {
        return reviewMapper.getAll();
    }

    public List<Review> getByDocId(String docId) {
        return reviewMapper.getByDocId(docId);
    }

    public int getCountByDocId(String docId) {
        return reviewMapper.getCountByDocId(docId);
    }

    public int getAvgLevelByDocId(String docId) {
        return reviewMapper.getAvgLevelByDocId(docId);
    }

}
